﻿namespace MedicalCare.Utilities
{
    public abstract class AMessage
    {
        protected AMessage()
        {
            ErrorType = ErrorTypes.SUCCESS.ToString();
            Success = false;
            Description = "Not initialized";
        }

        protected AMessage(bool success, string description)
        {
            Success = success;
            Description = description;
        }

        public void FlagError(string errorType, string errorDescription)
        {
            ErrorType = errorType;
            Description = errorDescription;
            Success = false;
        }

        public virtual bool Success
        {
            get;
            set;
        }

        public virtual string Description
        {
            get;
            set;
        }

        public virtual string ErrorType
        {
            get;
            set;
        }
    }
}
